package run.newbug.jt.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import run.newbug.jt.service.RightsService;
import run.newbug.jt.vo.SysResult;

@RestController
@RequestMapping("rights")
@CrossOrigin
public class RightsController {
    @Autowired
    private RightsService rightsService;

    @GetMapping("getRightsList")
    public SysResult getRig(){
        return SysResult.succe(rightsService.getAll());
    }
}
